from playwright.sync_api import sync_playwright

class UnitBrowser:
    def __init__(self,end_point):
        self.ws_endpoint = end_point

    def generate_browser(self):
        with sync_playwright() as p:
            browser = p.chromium.connect(self.ws_endpoint)
            return browser

